package cn.tk.repository.mr;

import cn.tk.model.entity.mr.Intent;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by denglw on 2021/7/21.<br/>
 * Desc: 意图
 */
@Repository("mrIntentDao")
public interface IntentDao extends JpaRepository<Intent, Long> {

    /**
     * 获取系统中所有意图
     * @return 列表
     */
    @Override
    @Query(value = "select * from mr_intent where deleted=0 and disabled=0", nativeQuery = true)
    List<Intent> findAll();
}
